package array;

public class ArraySort1 {
  public static void main(String args[]){
	   int[] a = {8,2,3,7,1};
	
	    for(int i=0;i<a.length-1;i++){
	          for(int j=0;j<a.length-i-1;j++){
	            if(a[j]>a[j+1]){
	               int tmp = a[j];
	               a[j] = a[j+1];
	               a[j+1] = tmp;
	            }
	          }
	       }
	    
	   print(a);
	}
  public static void print(int[] a){
	  for(int i=0;i<a.length;i++){
		  System.out.print(a[i]+"\t");
	  }
  }
}
